/*
 * lexer.h
 *
 * Author: Michael Stegeman
 * SID: 12142906
 * Date: 4/2/08
 *
 * Description: Header file for lexer functions
 */

#include "instr_list.h"

/* 
 * Main lexer function: Takes "line" as input, delimited by delims, 
 * stores valid tokens in linked list and outputs to out, 
 * outputs invalid tokens to err, returns number of errors found
 */
int lex(FILE *out, FILE *err, char *line, int linenum, char *delims, struct token_list *tl);

/* 
 * Determines whether or not a string is an integer 
 * Returns 1 if true, 0 if false
 */
int is_int(char *);

/* 
 * Determines whether or not a string is a float 
 * Returns 1 if true, 0 if false
 */
int is_float(char *);

/* 
 * Determines whether or not a string is a character to be used with PTC 
 * Returns 1 if true and puts resulting character in dest, 0 if false
 */
int is_char(char *tok, char *dest);
